/*
 * Copyright (c) 2018.
 * This file was written by Fancyears·Milos·Malvis @connor. Any question/bug you can't post to 1243093366@qq.com.
 * ALL RIGHTS RESERVED.
 */
package org.fancyears.sql;

/**
 * @author: Fancyears·Milos·Malvis
 * @CreateDate: 2019年1月18日 下午2:36:28
 * @Description: 基础的dao，有mybatis 插件生成的原生部分代码
 */

public interface IBaseSQLUtil<T> extends CommonBaseSQLUtil<T>{
	/**
	 * 主键查询
	 * 
	 * @param param
	 * @return
	 */
	T selectByPrimaryKey(Object param) throws Exception;

	/**
	 * 主键删除
	 * 
	 * @param param
	 * @return
	 */
	int deleteByPrimaryKey(Object param) throws Exception;

	/**
	 * 全插入(可批量插入，依赖SQL的写法)
	 * 
	 * @param param
	 * @return
	 */
	int insert(Object param) throws Exception;

	/**
	 * 选择插入(可批量插入，依赖SQL的写法)
	 * 
	 * @param param
	 * @return
	 */
	int insertSelective(Object param) throws Exception;

	/**
	 * 主键选择更新
	 * 
	 * @param param
	 * @return
	 */
	int updateByPrimaryKeySelective(Object param) throws Exception;

	/**
	 * 主键全部更新
	 * 
	 * @param param
	 * @return
	 */
	int updateByPrimaryKey(Object param) throws Exception;
}
